import { createRouter, createWebHistory } from 'vue-router';
import BaseLayout from '@//layouts/BaseLayout.vue';
import CreateFlow from '@/views/flows/CreateFlow.vue';
import ManageFlow from '@/views/flows/ManageFlow.vue';

const routes = [
    {
        path: '/',
        redirect: '/createFlow',
    },
    {
        path: '/',
        component: BaseLayout,
        children: [
            {
                path: 'createFlow',
                name: '流程创建',
                component: CreateFlow,
            },
            {
                path: 'manageFlow',
                name: '流程管理',
                component: ManageFlow,
            },
        ],
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
